<?php
/*
Description: This file is used to create access group, which will contain list of modules accessble for 
the users who belongs to this group.
*/
#########IncludeFiles####################################################################################
include_once '../inc/config.php';
include_once("../inc/bootstrape.php");
require_once _SITE_PATH_.'classes/CommonUtility/CommonUtility.php';

//    CHANGE PASSWORD    CODE    //           
if( $_POST['submit']=='Submit')
{    
    $parms['access_group'] = $_POST['access_group'];
    $parms['username'] = $_POST['username'];
    $parms['name'] = $_POST['name'];
    $parms['password'] = $_POST['password'];
    $parms['email'] = $_POST['email'];
    $parms['added'] = date('Y-m-d');
    if( CommonUtility::insertData($parms, 'admin')) {        
        header("Location: user_mng.php?msg=1071");            
        exit;
    }
    $err = 1072;    
}

//    END CHANGE PASSWORD CODE    //
$errMsg = $err;
$_tplName = 'admin-users/user_add.tpl';
$_title = 'Add Admin User';
require_once _ADMIN_TPL_MAIN_;
?>